How to modify SUICheckBox image type by script using Java
When SUICheckBox is unchecked
In your Java class, do the following:
public class YourClass extends Component {
// creates a new SImageType
public SImageType type; // select in properties
// creates a new SUICheckBox, @AutoWired seleciona o componente desde objeto
@AutoWired
private SUICheckBox checkBox;
@Override
public void start() {
}
@Override
public void repeat() {
// changes the SUICheckBox type
checkBox.setUncheckedImageType(type);
}
}
When SUICheckBox is checked
In your Java class, do the following:
public class YourClass extends Component {
// creates a new SImageType
public SImageType type; // select in properties
// creates a new SUICheckBox, @AutoWired selects the component from this object
@AutoWired
private SUICheckBox checkBox;
public void start() {
}
public void repeat() {
// changes the SUICheckBox type
checkBox.setCheckedImageType(type);
}
}